package com.springboot.cloud.sysadmin.organization.entity.form;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.springboot.cloud.common.web.entity.form.BaseQueryForm;
import com.springboot.cloud.sysadmin.organization.entity.param.UserQueryParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Past;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@ApiModel
@Data
public class UserQueryForm extends BaseQueryForm<UserQueryParam> {

    @ApiModelProperty(value = "账号")
    private String username;

    @ApiModelProperty(value = "昵称")
    private String nickname;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "用户状态（正常、停用）")
    private boolean enabled = true;

    @ApiModelProperty(value = "是否未锁定（1正常、0停用）")
    private boolean accountNonLocked = true;

    @ApiModelProperty(value = "是否已删除Y：已删除，N：未删除 ")
    private String deleted = "N";

    @ApiModelProperty(value = "部门id")
    private String deptId;

    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    @Past(message = "查询开始时间必须小于当前日期")
    @ApiModelProperty(value = "查询开始时间")
    private Date createdTimeStart;

    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    @Past(message = "查询结束时间必须小于当前日期")
    @ApiModelProperty(value = "查询结束时间")
    private Date createdTimeEnd;

    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    private List<Date> createdTime;
}
